﻿<template>
  <div class="com-demo" >
    动态组件
    接受到的参数--------
    <div>{{params}}</div>
    <span @click="close">关闭</span>
  </div>
</template>
<script>
export default {
  name:'demo',
  data(){
    return{
      test:'234'
    }
  },
  props:['params'],
  methods:{
    close(){
      this.$emit('close')
    }
  },
  mounted(){
    console.log("params", this.params);
  }
}
</script>
<style lang="scss" scoped>
.com-demo{
  width: 3rem;
  height:2rem;
  background: #fff;
  color:#000;
  font-size:0.2rem;
}
</style>


